package com.yulinlin.admin.modules.exception;

import java.util.Map;

public class ApiException extends RuntimeException {



    private  ExceptionType type;

    public ApiException(ExceptionType type) {
        super(type.message);
        this.type = type;
    }



    public int getCode() {
        return type.code;
    }


    public static enum ExceptionType{

        ;
        private int code ;

        private String message;

        ExceptionType(int code, String message) {
            this.code = code;
            this.message = message;
        }
    }




}
